home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / AmigaTalk / system / DosFlags.st < prev    next >
Encoding:
Text File  |  2004-01-31  |  1.5 KB  |  58 lines

  1. "----------------------------------------------------------------------"
  2. " This class defines all the known Tags & Flags associated with the    "
  3. " AmigaDOS filing system.  If you do not know what they do, you should "
  4. " NOT be messing with this class!                                      "
  5. ""
  6. " ALL singleton classes MUST contain the following:                    "
  7. ""
  8. "   the methods:  isSingleton AND privateSetup     AND                 "
  9. "                 uniqueInstance Class instance variable.              "
  10. "----------------------------------------------------------------------"
  11.  
  12. Class DosFlags :Object ! uniqueInstance private0 private1 myName !
  13. [
  14.    isSingleton
  15.  
  16.      ^ true  
  17. |
  18.    privateNew ! newInstance !
  19.    
  20.     newInstance <- <primitive 110 1>. " Object does NOT respond to new. "
  21.     
  22.     ^ newInstance  
  23. |  
  24.    new
  25.  
  26.      ^ (self privateSetup)
  27. |
  28.    privateSetup
  29.  
  30.      (uniqueInstance isNil)
  31.        ifTrue: [ uniqueInstance <- self privateNew.
  32.                  
  33.                  myName         <- 'AmigaTalk:prelude/listFiles/DosFlags.dictionary'.
  34.  
  35.                  private0       <- <primitive 206 3>.
  36.  
  37.                  private1       <- <primitive 206 1 myName private0>. ].
  38.                
  39.      ^ self
  40. |
  41.    close     " Remove, Kill, Destroy, Burn the Bridge, etc! "
  42.  
  43.      private1   <- <primitive 206 0 private1 private0>.
  44.  
  45.      ^ private0 <- nil.
  46. |
  47.    systemTag: aSymbol
  48.  
  49.      " Search for aSymbol in the SystemDictionary & return it's
  50.      * associated value:
  51.      " 
  52.      ^ <primitive 206 2 private0 aSymbol>
  53.    printString
  54.  
  55.      ^ 'DosFlags'
  56. ]
  57.